#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"

class G4ParticleGun;

class KSADPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
	public:
		KSADPrimaryGeneratorAction();
		~KSADPrimaryGeneratorAction();

		void GeneratePrimaries(G4Event*);
		void rayGunPositioning();
		void setPolarAngle(G4double);		// Set ray gun polar angle in radians
		void setAzimuthalAngle(G4double);	// Set ray gun azimuthal angle in radians
		void setStartCrystalI(G4int);		// Set crystal number in j direction to focus the ray gun on
		void setStartCrystalJ(G4int);		// " " " " k " " " " " " "
		void setPFCI(G4double);			// Set the position from center of start crystal to focus ray gun on
		void setPFCJ(G4double);			//
		void setPFCK(G4double);			//
		void setFilePath(G4String);		// Set the file path for ROOT data to be stored (in file named data.root)
		G4String GetFilePath();			// Get " " " " " "
		G4float GetPolarAngle();
		G4float GetAzimuthalAngle();
		G4float GetPFCK();

	private:
		G4ParticleGun *rayGun;
		G4double polarAngle; G4double azimuthalAngle;
		G4int startCrystalI; G4int startCrystalJ;
		G4double PFCI; G4double PFCJ; G4double PFCK;
		G4String path;
};
